/* static/user/css/modules/order.css */
/* 订单列表抽屉 */
/* order.css 优化后 */
.order-list-drawer {
    position: fixed;
    top: 0;
    left: -420px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.order-list-drawer--active {
    left: 0;
}

.order-list__header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.order-list__header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.order-drawer-close-btn {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    line-height: 1;
}

.order-drawer-close-btn:hover {
    color: #333;
    transform: scale(1.1);
}

.order-list__content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
}

/* 订单项优化 */
.order-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.order-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-id {
    font-size: 14px;
    color: #666;
    font-family: monospace;
}

.order-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-0 { background: #ffc107; color: #333; } /* 待取 */
.status-1 { background: #2196f3; color: white; } /* 待归还 */
.status-2 { background: #4caf50; color: white; } /* 已完成 */

.order-item__meta {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.order-item__meta p {
    margin: 6px 0;
    display: flex;
    align-items: center;
}

.order-item__meta p::before {
    content: "•";
    color: #999;
    margin-right: 8px;
}

/* 查看详情按钮样式 */
.view-details-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #2196f3;
    color: #2196f3;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-details-btn:hover {
    background: #2196f3;
    color: white;
    box-shadow: 0 2px 8px rgba(33,150,243,0.3);
}

.view-details-btn::after {
    content: "→";
    font-weight: 500;
    transition: transform 0.2s;
}

.view-details-btn:hover::after {
    transform: translateX(2px);
}

/* 加载动画优化 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*订单详情样式*/
/* order.css 订单详情优化 */
.order-details-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 740px;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    z-index: 1002;
    display: none;
    padding: 24px;
    overflow: hidden;
}

.order-details-modal.active {
    display: flex;
    flex-direction: column;
}

.order-details__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.order-details__header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-id {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    font-family: monospace;
}

.order-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
    padding: 0;
    background: transparent;
}

.summary-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-item span:first-child {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.summary-item .total-amount {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 600;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 16px;
}

/* 器材卡片优化 */
.order-item-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.order-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.order-item-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
    aspect-ratio: 1/1;
}

.order-item-card:hover img {
    transform: scale(1.02);
}

.item-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-info h4 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
}

.item-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.meta-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.meta-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.meta-item .value {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 关闭按钮优化 */
.order-drawer-close-btn {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: all 0.2s;
}

.order-drawer-close-btn:hover {
    color: #666;
    transform: rotate(90deg);
}